class ClassEntity{
  int? _code;
  ClassResult? _data;
  String? _message;

  ClassEntity({int? code,ClassResult? data,String? message}){
    this._code = code;
    this._data = data;
    this._message = message;
  }

  int? get code => _code;
  set setCode(int? code)=>_code = code;
  String? get message => _message;
  set setMessage(String? message) => _message = message;
  ClassResult? get data =>_data;
  set getData(ClassResult? data) => _data = data;
  ClassEntity.fromJson(Map<String,dynamic> json){

    _code = json['code'];
    _data = json['data'] != null ? new ClassResult.fromJson(json['data']):null;
    _message = json['message'];

  }

  Map<String,dynamic> toJson(){
    final Map<String,dynamic> data = new Map<String,dynamic>();
    data['code'] = this._code;
    data['message'] = this._message;
    data['data'] = this._data!.toJson();

    return data;
  }
}

class ClassResult {
  List<ClassData>? _principal;
  List<ClassData>? _additional;

  ClassResult({List<ClassData>? principal, List<ClassData>? additional}) {
    this._principal = principal;
    this._additional = additional;
  }

  List<ClassData>? get principal => _principal;
  set setPrincipal(List<ClassData>? principal) => _principal = principal;
  List<ClassData>? get additional => _additional;
  set setAdditional(List<ClassData>? additional) => _additional = additional;

  ClassResult.fromJson(Map<String, dynamic> json) {
    if (json['principal'] != null) {
      _principal = [];
      json['principal'].forEach((v) {
        _principal!.add(new ClassData.fromJson(v));
      });
    }
    if (json['additional'] != null) {
      _additional = [];
      json['additional'].forEach((v) {
        _additional!.add(new ClassData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this._principal != null) {
      data['principal'] = this._principal!.map((v) => v.toJson()).toList();
    }
    if (this._additional != null) {
      data['additional'] = this._additional!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ClassData{

  int? _id;
  String? _title;

  ClassData({int? id, String? title, int? page}) {
    this._id = id;
    this._title = title;
  }

  int? get id => _id;
  set setId(int? id) => _id = id;
  String? get title => _title;
  set setTitle(String? title) => _title = title;


  ClassData.fromJson(Map<String, dynamic> json) {
    _id = json['id'];
    _title = json['title'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this._id;
    data['title'] = this._title;
    return data;
  }

}
